Developer Documentation

QuickTime 4 API Documentation

Programming With QuickTime VR

| Previous | Chapter Contents | Chapter Top | Next |

Determining Viewing Limits and Constraints

The QuickTime VR Manager provides functions that you can use to get the physical viewing limits of a movie and to get and set a movie's constraints.

QTVRGetViewingLimits

You can use the QTVRGetViewingLimits function to get the current viewing limits of a QuickTime VR movie.

OSErr QTVRGetViewingLimits (
                     QTVRInstanceqtvr,
                     UInt16kind,
                     float*minValue,
                     float*maxValue);
qtvr
An instance of a QuickTime VR movie.
kind
The type of viewing limits to be returned. See "Constraint Types" for a description of the available types of viewing limits.
minValue
On entry, a pointer to a floating-point value. On exit, the minimum viewing limit of the specified type is copied into that value.
maxValue
On entry, a pointer to a floating-point value. On exit, the maximum viewing limit of the specified type is copied into that value.
function result
A result code.

DESCRIPTION

The QTVRGetViewingLimits function returns, in the floating-point values pointed to by the minValue and maxValue parameters, the current minimum and maximum values for angles whose type is specified by the kind parameter.

The maximum field of view of a panoramic node can be limited by the size of the back buffer and the current aspect ratio of the movie's graphics world.

The values returned by QTVRGetViewingLimits are unaffected by the current control settings.

QTVRGetViewingLimits returns information about the physical viewing limits of a panorama or object. To get information about the current viewing constraints, use QTVRGetConstraints .

QTVRGetConstraintStatus

You can use the QTVRGetConstraintStatus function to get the set of constraints active for the current view.

UInt32 QTVRGetConstraintStatus (QTVRInstanceqtvr);
qtvr
An instance of a QuickTime VR movie.
function result
A long integer whose bits are set or cleared to represent the currently active constraints of the specified QuickTime VR movie.

DESCRIPTION

The QTVRGetConstraintStatus function returns, as its function result, a long integer whose bits encode the constraints currently active for the QuickTime VR movie specified by the qtvr parameter. See "Viewing Constraints" for a description of the available constraints.

The values returned by QTVRGetConstraintStatus are unaffected by the current control settings.

QTVRGetConstraints

You can use the QTVRGetConstraints function to get the current constraints of a movie.

OSErr QTVRGetConstraints (
                     QTVRInstance qtvr,
                     UInt16kind,
                     float*minValue,
                     float*maxValue);
qtvr
An instance of a QuickTime VR movie.
kind
The type of constraints to be returned. See "Constraint Types" for a description of the available types of constraints.
minValue
On entry, a pointer to a floating-point value. On exit, the current minimum constraint of the specified type is copied into that value.
maxValue
On entry, a pointer to a floating-point value. On exit, the current maximum constraint of the specified type is copied into that value.
function result
A result code.

DESCRIPTION

The QTVRGetConstraints function returns, in the floating-point values pointed to by the minValue and maxValue parameters, the current minimum and maximum constraints of the type specified by the kind parameter.

The values returned by QTVRGetConstraints are unaffected by the current control settings.

SEE ALSO

Use QTVRSetConstraints (next) to set a movie's minimum and maximum constraints.

QTVRSetConstraints

You can use the QTVRSetConstraints function to set the constraints of a movie.

OSErr QTVRSetConstraints (
                     QTVRInstanceqtvr,
                     UInt16kind,
                     floatminValue,
                     floatmaxValue);
qtvr
An instance of a QuickTime VR movie.
kind
The type of constraint to set. See "Constraint Types" for a description of the available types of constraints.
minValue
A floating-point value that contains the desired minimum constraint of the specified type.
maxValue
A floating-point value that contains the desired maximum constraint of the specified type.
function result
A result code.

DESCRIPTION

The QTVRSetConstraints function sets the minimum and maximum constraints of the type specified by the kind parameter to the values specified by the minValue and maxValue parameters. Note that when you want to specify a pan angle constraint, the minValue and maxValue parameters should be specified so that a clockwise sweep from minValue to maxValue selects the desired angular expanse. For example, to constrain panning in the 90-degree expanse that spreads out 45 degrees on each side of the pan angle 0 degrees, you should set the minValue parameter to 315 degrees and the maxValue parameter to 45 degrees. Similarly, to constrain panning in the remaining 270-degree expanse, you should set the minValue parameter to 45 degrees and the maxValue parameter to 315 degrees.

The values passed to QTVRSetConstraints are unaffected by the current control settings.

SEE ALSO

Use QTVRGetConstraints to get a movie's minimum and maximum constraints.


© 1998 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |